package sale.entities;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import client.entities.ClientVO;
import employee.entities.EmployeeVO;

public class SaleVO implements Serializable {

	private static final long serialVersionUID = 1L;

	private int saleKey, tableKey;
	private EmployeeVO emp;
	private ClientVO client;
	private Date openDate, closeDate;
	private ArrayList<OrderVO> orders;
	private String address;
	private String tel;
	private boolean isOpen;
	private double total;

	public int getSaleKey() {
		return saleKey;
	}

	public void setSaleKey(int saleKey) {
		this.saleKey = saleKey;
	}

	public int getTableKey() {
		return tableKey;
	}

	public void setTableKey(int tableKey) {
		this.tableKey = tableKey;
	}

	public EmployeeVO getEmp() {
		return emp;
	}

	public void setEmp(EmployeeVO emp) {
		this.emp = emp;
	}

	public ClientVO getClient() {
		return client;
	}

	public void setClient(ClientVO client) {
		this.client = client;
	}

	public Date getOpenDate() {
		return openDate;
	}

	public void setOpenDate(Date openDate) {
		this.openDate = openDate;
	}

	public Date getCloseDate() {
		return closeDate;
	}

	public void setCloseDate(Date closeDate) {
		this.closeDate = closeDate;
	}

	public ArrayList<OrderVO> getOrders() {
		return orders;
	}

	public void setOrders(ArrayList<OrderVO> orders) {
		this.orders = orders;
	}

	public boolean isOpen() {
		return isOpen;
	}

	public void setOpen(boolean isOpen) {
		this.isOpen = isOpen;
	}

	public double getTotal() {
		return total;
	}

	public void setTotal(double total) {
		this.total = total;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}
	
	public SaleVO(int saleKey, int tableKey, EmployeeVO emp, ClientVO client,
			Date openDate, Date closeDate, ArrayList<OrderVO> orders,
			String address, String tel, boolean isOpen, double total) {
		super();
		this.saleKey = saleKey;
		this.tableKey = tableKey;
		this.emp = emp;
		this.client = client;
		this.openDate = openDate;
		this.closeDate = closeDate;
		this.orders = orders;
		this.address = address;
		this.tel = tel;
		this.isOpen = isOpen;
		this.total = total;
	}
	
	public SaleVO(int saleKey, int tableKey, EmployeeVO emp, ClientVO client,
			ArrayList<OrderVO> orders, String address, String tel,
			boolean isOpen, double total) {
		super();
		this.saleKey = saleKey;
		this.tableKey = tableKey;
		this.emp = emp;
		this.client = client;
		this.openDate = Calendar.getInstance().getTime();
		this.closeDate = null;
		this.orders = orders;
		this.address = address;
		this.tel = tel;
		this.isOpen = isOpen;
		this.total = total;
	}

}
